﻿using System;
using System.ComponentModel;

using SBPweb.Modules.Modularity;

namespace SBPweb.MediaCenter.Modules.Organizer.WPF
{

    public class Module : Organizer.Module
    {

        #region Constructor logic

        public Module(IModuleHost parent)
            : base(parent)
        {
            Name = "Organizer";
        }

        #endregion

        #region Property accessors

        public new Controllers.OrganizerService Organizer
        {
            get
            {
                return base.Organizer as Controllers.OrganizerService;
            }
            protected set
            {
                base.Organizer = value;
            }
        }

        #endregion

        #region Methods

        #region Initialization logic

        public override void Initialize()
        {
            base.Initialize();

            if (HostType != ModuleHostType.WindowsPresentationFoundation)
            {
                //TODO: log something
                return;
            }
        }

        public override void InstantiateServices()
        {
            base.InstantiateServices();
            Organizer = new Controllers.OrganizerService(this);
        }

        public override void InitializeMenus()
        {

        }

        public override void InitializeSmartparts()
        {
            Host.Smartparts.Add(new Controls.FolderView(this));
        }

        #endregion

        public override void LoadPersistency()
        {
            //throw new NotImplementedException();
        }

        public override void SavePersistency()
        {
            //throw new NotImplementedException();
        }

        public override void Terminate()
        {
            //throw new NotImplementedException();
        }

        #endregion

    }

}